// 生育管理
import breeding from "@/api/axios";
export default {
  // 获取母羊ID
  getByFemaleId(params) {
    return breeding.sheepOut.post('/breeding/v1/queryByFemaleIdNewest/', {
      params
    })
  },

  // 分页查询/birth/v1/queryPageByCondition
  postQueryPaging(params) {
    return breeding.sheepOut.post('/breeding/birth/v1/queryPageByCondition',
      params)
  },

  // 根据母羊id查询最新记录, 获取合养的供养信息
  getqueryByFemaleIdNewest(params) {
    return breeding.sheepOut.get(`/breeding/breeding/v1/queryByFemaleIdNewest/${params}`)
  },

  // 添加生育信息 /breeding/birth/v1/add
  postBirthAdd(params) {
    return breeding.sheepOut.post('/breeding/birth/v1/add',
      params)
  },

  // 删除羊的生育记录/breeding/birth/v1/delByIdList
  postDelByIdList(params) {
    return breeding.sheepOut.post('/breeding/birth/v1/delByIdList',
      params)
  },
  // 根据主键查询生育记录 /birth/v1/queryById/{birthRecordId}
  getQueryById(params) {
    return breeding.sheepOut.get(`/birth/v1/queryById/${params}`)
  },
  // 根据个体ID查询信息 /bion/v1/bion/queryBionById/{bionId}
  getQueryBionById(params) {
    return breeding.sheepOut.get(`/bion/v1/bion/queryBionById/${params}`)
  },
  // 根据合养记录查询配种记录 /breeding/v1/queryById/{raiseRecordId}
  getRaiseQueryById(params) {
    return breeding.sheepOut.get(`/breeding/breeding/v1/queryById/${params}`)
  },
  // 批量查询同种类个体 bion/v1/bion/queryBionByIdList
  getQueryBionByIdList(params) {
    return breeding.sheepOut.post('bion/v1/bion/queryBionByIdList',
      params)
  },
  // 修改生育记录/breeding/birth/v1/edit
  postEdit(params) {
    return breeding.sheepOut.post('/breeding/birth/v1/edit',
      params)
  },
  /**
  * @description: 查询所有个体信息
  * @return {Object}
  */
  queryBionAll(params) {
    return breeding.sheepOut.get(`/bion/v1/bion/queryBionAll/${params.breed}`);
  },
  // 查询母羊 /bion/v1/bion/queryBionByMatrix/{breed}
  queryBionByMatrix(params) {
    return breeding.sheepOut.get(`/bion/v1/bion/queryBionByMatrix/${params.breed}`);
  }
}
